#! /bin/bash
export LANG=zh_CN.UTF-8
HIVE_HOME=/usr/bin/hive


${HIVE_HOME} -S -e "

drop table if exists edu_rpt.school_num
create table edu_rpt.school_num(
    c_day string,
    c_month string,
    c_year string,
    orgin_type string,
    itcast_school_id int,
    itcast_school_name string,
    itcast_subject_id int,
    itcast_subject_name string,
    r_num_total decimal(38,2),
    s_num_total decimal(38,2),
    live_num_total decimal(38,2),
    r_cnt_total decimal(38,2)
)comment'日期校区学科线上线下'
row format delimited
fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');
drop table if exists edu_rpt.orgin_type_num
create table edu_rpt.origin_num(
    c_day string,
    c_month string ,
    c_year string ,
    orgin_type string,
    origin_channel string,
    tdepart_id int,
    tdepart_name string,
    r_num_total decimal(38,2),
    s_num_total decimal(38,2),
    live_num_total decimal(38,2),
    r_cnt_total decimal(38,2)
) comment '每日/月/年线上线下意向转报名率报名人数'
row format delimited
fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');"